#include "processBar.h"



void processbar()
{
    
    char str[102] = {0};
    //memset(str, 0, sizeof(str));
    //const char *end = "|/-\\";
    const char end[4] = {'|', '/', '-', '\\'};
    int cnt = 0;
    while(cnt <= 100)
    {
        printf("[%-100s][%d%%][%c]\r", str, cnt, end[cnt%4]);
        fflush(stdout);
        str[cnt++] = '=';
        if(cnt < 100)
        {    
            str[cnt] = '>';
        }
        usleep(100000);
    }
    printf("\n");

}
